/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package chartcreator;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 *
 * @author Amigao
 */
public class ChartFrame extends JFrame{
    Container cp = getContentPane();
    BufferedImage imagem;

    public ChartFrame(String name){
        super(name);
        cp.setLayout(new FlowLayout());
    }

    public void desenhar(BufferedImage imagem){
    // desenha a imagem no JFrame
    this.imagem = imagem;
    Graphics g = getGraphics();
    g.drawImage(imagem, 0, 30, this);
    
    }
    
    public void paint (Graphics g) {
    g.drawImage (imagem,0,30,this);
    }

}
